import { useContext } from "react"
import ContextTodo from "../../store/todolist"

const formInput = () => {
    const context = useContext(ContextTodo)
    return (<>
        日期：<input type="text" value={state.date} onChange={updateDate} /><br />
        标题：<input type="text" value={state.title} onChange={updateTitle} /><br />
        优先级：<Radio.Group value={state.priority} onChange={changePriority}>
            <Radio value='1' checked={state.priority === '1'}>A</Radio>
            <Radio value='2' checked={state.priority === '2'}>B</Radio>
            <Radio value='3' checked={state.priority === '3'}>C</Radio>
            <Radio value='4' checked={state.priority === '4'}>D</Radio>
        </Radio.Group>
        <button onClick={save}>添加</button>
    </>)
}
export default formInput